<?php


namespace app\mall\controller;


use app\data\controller\api\Auth;

class Remind extends Auth
{
    /**
     * 获取中奖提醒
     */
   public function winningRemind(){
       $list = \app\data\model\Remind::where(['user_id'=>$this->uuid,'is_remind'=>0])->select();
       $this->success('获取成功',$list);
   }

   /**
    * 用户确认中奖提醒
    */
   public function confirmRemind(){
       $ids = request()->post('ids/a',[]);
       if(!empty($ids)){
           \app\data\model\Remind::whereIn('id',$ids)->where(['user_id'=>$this->uuid])
               ->save(['is_remind'=>1,'remind_time'=>date('Y-m-d H:i:s')]);
       }
       $this->success('ok');
   }
}